﻿#region Copyright (c) Nicola Gallo All rights reserved.
/*
 * All rights reserved. Reproduction of trasmission of this file, or a portion thereof,
 * is forbidden without prior written permission of Nicola Gallo.
 * 
 * Author: Nicola Gallo
 * Date: 09/04/2011
 * 
 * */
#endregion
namespace PrismMVC.Shell.MVC
{
    //.NET References
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;

    //PrismMVC references
    using PrismMVC.Shell.Containers;

    /// <summary>
    /// Interface that each controller should implements.
    /// </summary>
    public interface IController
    {
        //Events

        /// <summary>
        /// Occurs when the controller is navigating.
        /// </summary>
        event EventHandler<ControllerEventArgs> Navigating;

        //Properties

        /// <summary>
        /// Gets/Sets the current view.
        /// </summary>
        ViewResult CurrentView { get; }

        //Methods

        /// <summary>
        /// Initializes the controller.
        /// </summary>
        void Initialize();

        /// <summary>
        /// Runs the controller.
        /// </summary>
        void Run();

        /// <summary>
        /// Kills the controller.
        /// </summary>
        void Stop();        

        /// <summary>
        /// Invokes an action.
        /// </summary>
        /// <param name="actionName">Action name.</param>
        /// <param name="args">Arguments.</param>
        /// <returns>Action result.</returns>
        ActionResult InvokeAction(String actionName, object args);
    }
}